package ualrcdg.shared.dto;

/**
 * Utility class for storing data of two arbitrary data together.
 * 
 * @param <T1> type of the "first" data member
 * @param <T2> type of the "second" data member
 */
public class Pair< T1, T2 >
{
	final T1 value1;
	final T2 value2;
	
	/**
	 * Primary constructor
	 *
	 * @param value1 the "first" value of the Pair object to be created
	 * @param value2 the "second" value of the Pair object to be created
	 */
	public Pair( T1 value1, T2 value2 )
	{
		this.value1 = value1;
		this.value2 = value2;
	}
	
	/*
	 * @see java.lang.Object#toString()
	 */
	@Override
	public String toString( )
	{
		return "Pair [value1=" + value1 + ", value2=" + value2 + "]";
	}

	/**
	 * @return the value1 of this Pair instance
	 */
	public T1 getValue1( )
	{
		return value1;
	}

	/**
	 * @return the value2 of this Pair instance
	 */
	public T2 getValue2( )
	{
		return value2;
	}
}
